package mason.dp.abstractfactory.factory;

import mason.dp.abstractfactory.computer.Computer;
import mason.dp.abstractfactory.computer.WinBook;
import mason.dp.abstractfactory.computer.WinComputer;
/**
 * Win平台计算机工厂
 * @author MasonAir
 *
 */
public class WinComputerFactory implements ComputerFactory {

	@Override
	public Computer createComputer(String type) {
		Computer c = null;
		ComputerComponentFactory ccf = new WinComponentFactory();
		if ("笔记本".equals(type)) {
			c = new WinBook("Win平台笔记本", ccf);
		} else if ("台式机".equals(type)) {
			c = new WinComputer("Win平台台式机", ccf);
		}
		return c;
	}

}
